/* Copyright (c) 2025 Beijing Semidrive Technology Corporation
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/** **************************************************************************************
 * \file     Xtrg_PBCfg.c
 * \brief    AUTOSAR 4.3.1 MCAL xtrg generate file
 *
 * <table>
 * <tr><th>Date           <th>Version
 * <tr><td>2023/09/07     <td>1.0.0
 * </table>
 *****************************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif
/*****************************************************************************************
 *                       Include header files
 *****************************************************************************************/
#include "Xtrg_Types.h"
#include "Xtrg_Cfg.h"
#include "Xtrg_Sig.h"
#include "Compiler.h"

#define XTRG_START_SEC_CONST_UNSPECIFIED
#include "Xtrg_MemMap.h"


const Xtrg_SignalType Xtrg1_SigOutConfig_0 = {
    .signalInput = EPWM1_CMP_A0,
    .signalOutput = ETIMER1_CPT_A0,
};

const Xtrg_SignalType Xtrg1_SigOutConfig_1 = {
    .signalInput = EPWM1_CMP_B0,
    .signalOutput = ETIMER1_CPT_B0,
};

const Xtrg_SignalType Xtrg1_SigOutConfig_2 = {
    .signalInput = EPWM1_CMP_C0,
    .signalOutput = ETIMER1_CPT_C0,
};

const Xtrg_SignalType Xtrg1_SigOutConfig_3 = {
    .signalInput = EPWM1_CMP_D0,
    .signalOutput = ETIMER1_CPT_D0,
};

const Xtrg_SignalType Xtrg1_SigOutConfig_4 = {
    .signalInput = SSIG_9,
    .signalOutput = ETIMER2_CPT_A0,
};

const Xtrg_SignalType Xtrg1_SigOutConfig_5 = {
    .signalInput = SSIG_11,
    .signalOutput = ETIMER2_CPT_B0,
};

const Xtrg_SignalType Xtrg1_SigOutConfig_6 = {
    .signalInput = SSIG_12,
    .signalOutput = ETIMER2_CPT_C0,
};

const Xtrg_SignalType Xtrg1_SigOutConfig_7 = {
    .signalInput = EPWM1_CMP_C0,
    .signalOutput = ETIMER1_CPT_B0,
};

const Xtrg_SignalType Xtrg1_IOOutConfig_0 = {
    .signalInput = EPWM1_CMP_A0,
    .signalOutput = IO_O_41,
};

const Xtrg_SignalType Xtrg1_IOOutConfig_1 = {
    .signalInput = EPWM1_CMP_A1,
    .signalOutput = IO_O_42,
};

const Xtrg_SignalType Xtrg1_IOOutConfig_2 = {
    .signalInput = EPWM1_CMP_B0,
    .signalOutput = IO_O_43,
};

const Xtrg_SignalType Xtrg1_IOOutConfig_3 = {
    .signalInput = EPWM2_CMP_A0,
    .signalOutput = IO_O_44,
};

const Xtrg_SignalType Xtrg1_IOOutConfig_4 = {
    .signalInput = XTRG_PWM_INPUT,
    .signalOutput = IO_O_46,
};

const Xtrg_SignalType Xtrg1_IOOutConfig_5 = {
    .signalInput = EPWM1_CMP_C0,
    .signalOutput = IO_O_46,
};

const Xtrg_SignalType Xtrg1_IOOutConfig_6 = {
    .signalInput = EPWM1_CMP_D0,
    .signalOutput = IO_O_48,
};

const Xtrg_SigMatrixType Xtrg1_SignalMatrixConfig_0 = {
    .matrixInputCfg[0] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[1] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[2] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[3] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[4] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .truthTable = 0xFFFEFFFEU,
    .matrixSelector = XTRG_SIG_MATRIX8,
};

const Xtrg_SigMatrixType Xtrg1_SignalMatrixConfig_1 = {
    .matrixInputCfg[0] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[1] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[2] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[3] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[4] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .truthTable = 0xFFFFFFFEU,
    .matrixSelector = XTRG_SIG_MATRIX9,
};

const Xtrg_SigMatrixType Xtrg1_SignalMatrixConfig_2 = {
    .matrixInputCfg[0] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[1] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[2] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[3] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[4] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .truthTable = 0xFFFEFFFEU,
    .matrixSelector = XTRG_SIG_MATRIX10,
};

const Xtrg_SigMatrixType Xtrg1_SignalMatrixConfig_3 = {
    .matrixInputCfg[0] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[1] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[2] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[3] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[4] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .truthTable = 0xFFFFFFFEU,
    .matrixSelector = XTRG_SIG_MATRIX11,
};

const Xtrg_SigMatrixType Xtrg1_SignalMatrixConfig_4 = {
    .matrixInputCfg[0] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[1] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[2] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[3] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .matrixInputCfg[4] = {
    .matrixInput = 0U,
    .edgeDetect = FALSE,
    .edgeDetectMode = XTRG_PULSE_POSEDGE_DETECT,
},
    .truthTable = 0xFFFEFFFEU,
    .matrixSelector = XTRG_SIG_MATRIX12,
};

const Xtrg_IndrtTrigMuxType Xtrg1_TmuxIndrtConfig_0 = {
    .triggerSource = EPWM1_CMP_A0,
    .targetTidIndex = XTRG_TIDPOOL1,
    .targetCfg[0] = XTRG_TRIG_ADC2,
    .targetCfg[1] = XTRG_TRIG_NONE,
    .targetCfg[2] = XTRG_TRIG_NONE,
    .targetCfg[3] = XTRG_TRIG_NONE,
    .targetCfg[4] = XTRG_TRIG_NONE,
    .targetCfg[5] = XTRG_TRIG_NONE,
    .targetCfg[6] = XTRG_TRIG_NONE,
    .targetCfg[7] = XTRG_TRIG_NONE,
    .tidPool[0][0] = XTRG_TARGETLUT0,
    .tidPool[0][1] = XTRG_INDRT_TRIG_ADC_ENTRY0,
    .tidPool[1][0] = XTRG_TARGETLUT0,
    .tidPool[1][1] = XTRG_INDRT_TRIG_ADC_ENTRY1,
    .tidPool[2][0] = 0U,
    .tidPool[2][1] = 0U,
    .tidPool[3][0] = 0U,
    .tidPool[3][1] = 0U,
    .tidPool[4][0] = 0U,
    .tidPool[4][1] = 0U,
    .tidPool[5][0] = 0U,
    .tidPool[5][1] = 0U,
    .tidPool[6][0] = 0U,
    .tidPool[6][1] = 0U,
    .tidPool[7][0] = 0U,
    .tidPool[7][1] = 0U,
    .indirectTmux = XTRG_INDRT_TRG_MUX0,
};


const Xtrg_DeviceType Xtrg1_DeviceCfg = {
    .base = XTRG1_REG_BASE,
    .inst = XTRG1_INST,
    .cb = NULL_PTR,
    .arg = NULL_PTR,
};



const Xtrg_SignalType Xtrg2_IOOutConfig_0 = {
    .signalInput = EPWM3_CMP_A0,
    .signalOutput = IO_O_60,
};

const Xtrg_SignalType Xtrg2_IOOutConfig_1 = {
    .signalInput = EPWM4_CMP_A0,
    .signalOutput = IO_O_61,
};

const Xtrg_SignalType Xtrg2_IOOutConfig_2 = {
    .signalInput = XTRG_PWM_INPUT,
    .signalOutput = IO_O_10,
};


const Xtrg_DeviceType Xtrg2_DeviceCfg = {
    .base = XTRG2_REG_BASE,
    .inst = XTRG2_INST,
    .cb = NULL_PTR,
    .arg = NULL_PTR,
};



#define XTRG_STOP_SEC_CONST_UNSPECIFIED
#include "Xtrg_MemMap.h"
#ifdef __cplusplus
}
#endif
/* End of file */


